package objects.data;

import objects.ObjectCodes;
import utils.Utils;

import com.google.gson.Gson;

public class WorkPacket implements ObjectCodes {
	public String uniqueId;
	public String status;
	public String timestamp;
	public String jobname;
	public String sourceDir;
	public String resultDir;
	public String executable;
	public String args;
	public String walltime;
	public String pbsString;
	public int cluster;
	public int nodes;
	public int ppn;
	public int opt;
	public int optRange;
	public int replay;
	public boolean sendResultsBack;
	public boolean unzipResults;
	
	public WorkPacket() {}
	
	public String toString()
	{
		return CLI_WORK_PKT+"|"+ new Gson().toJson(this);
	}
	
	public static WorkPacket fromJSon(String json)
	{
		return new Gson().fromJson(json,WorkPacket.class);
	}

}
